<!--
 * @Descripttion:
 * @Copyright: 武汉一一零七科技有限公司©版权所有
 * @Link: 1074699502@qq.com
 * @Contact: QQ:1074699502
 * @LastEditors: 梧桐
 * @LastEditTime: 2020-11-14 21:55:36
-->
<template>
	<div class="goodsWrap" @click.stop="getnav('/pagesC/homeSon/goodsDetails?id='+info.id)">
		<slot></slot>

		<u-image width="100%" height="350rpx" :src="info.thumb_url" border-radius="8rpx 8rpx 0 0">
		</u-image>

		<view class="priceWrap">
			<p class="name"> <text v-if="info.leixing === 1" class="badeg-self">自营</text>{{ info.goods_name }}</p>
			<div class="bottom">
				<text class="goodsPrice"><span class="rmb">¥</span>{{ info.zs_price }}</text>
				<span class="currency">{{ info.zs_price | currency}}</span>
				<text class="moreAction" v-if="false">···</text>
			</div>
			<div>
				<slot name="goodsTag"></slot>
			</div>
		</view>

	</div>
</template>

<script>
	export default {
		name: "goodsCard",

		props: {
			info: {
				type: Object,
				default: function() {
					return {}
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	@font-face {
		font-family: pangmen;
		src: url('https://woshop-1258844920.cos.ap-nanjing.myqcloud.com/static/font/futurabq-medium_0.otf'),
	}

	@font-face {
		font-family: pangmen;
		src: url('https://woshop-1258844920.cos.ap-nanjing.myqcloud.com/static/font/nexa.ttf'),
	}

	.goodsWrap {
		background: #fff;
		width: 100%;
		border-radius: 12upx;
		overflow: hidden;
		margin: 8upx 0;
		flex-shrink: 0;

		.priceWrap {
			padding-left: 12upx;

			.badeg-self {
				font-size: 10px;
				padding: 4upx 8upx;
				border-radius: 100upx;
				display: inline-block;
				color: #fff;
				background-image: linear-gradient(to right, #ffa468, #fa3f3f);
				line-height: 1;
				margin-right: 8upx;
			}

			.bottom {
				display: flex;
				align-items: center;

				.moreAction {
					color: #aeb4bb;
					font-weight: 800;
					font-size: 40upx;
					letter-spacing: -4px;
					margin-right: 14upx;
				}
			}

			.goodsPrice {
				font-weight: 600;
				color: #fa3f3f;
				font-size: 34upx;
				-webkit-font-smoothing: antialiased;
				-moz-osx-font-smoothing: grayscale;
				font-family: "pangmen";

				.rmb {
					font-weight: 400;
					font-size: 10px;
				}
			}

			.name {
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
				line-height: 1.4;
				font-size: 28upx;
				letter-spacing: 1.75upx;
				margin: 8upx 0;
				color: #444;
			}
		}



		.coupon {
			width: 24upx;
			height: 16upx;
		}
	}

	.currency {
		color: #666;
		font-size: 24upx;
		margin-left: 8upx;
	}
</style>
